import Cookies from 'js-cookie'
const TokenKey = 'Mls-Token'
const UserKey = 'Mls-UserInfo'
export function getToken() {
  return localStorage.getItem(TokenKey)
}
export function setToken(token) {
  return localStorage.setItem(TokenKey, token)
}
export function removeToken() {
  return localStorage.removeItem(TokenKey)
}
export function getUser() {
  return localStorage.getItem(UserKey)
}
export function setUser(userInfo) {
  return localStorage.setItem(UserKey, userInfo)
}
export function removeUser() {
  return localStorage.removeItem(UserKey)
}
export function getCookies(type) {
  return Cookies.get(type)
}
export function setCookies(type, data) {
  return Cookies.set(type, data)
}